package com;

import java.io.FileInputStream;

/**
 * 自动关闭资源 1.7 新特性 并循环读取
 * 
 * @author lenovo
 *
 */
public class IO_03_FileInputStream_02 {

	public static void main(String[] args) {
		try (FileInputStream fis = new FileInputStream("./src/com/IO_01_Test.java")) {
			int tmp = 0;
			while ((tmp = fis.read()) != -1) {
				System.out.print((char) tmp);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
